<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input id="input" type="checkbox">篮球
    <!-- 
        input 输入框有checked,true表示选中，false表示没选中
     -->
    <script>
        var input = document.getElementById("input")
        input.checked = true
    </script>
</body>
</html>